* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/*Background*/
body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 4rem;
    overflow: hidden;
    position: relative;
    background: url("/Images/bgoflogin.png");
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.background-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}


/*Glass Container*/
.login-container {
    width: 420px;
    padding: 42px;
    border-radius: 28px;

    background: rgba(18, 12, 38, 0.85);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);

    border: 1px solid rgba(168, 85, 247, 0.35);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.55),
        inset 0 1px 1px rgba(255, 255, 255, 0.05);
    color: #fff;
    text-align: center;
    position: relative;
    z-index: 2;
}

form {
    text-align: left;
}

label {
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
    opacity: 0.85;
    margin-top: 10px;
}

/*Title*/
.subtitle {
    font-size: 14px;
    opacity: 0.75;
    margin-bottom: 32px;
}

/*Continue to Google*/
.google-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(168, 85, 247, 0.4);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.google-btn img {
    width: 18px;
}

.google-btn:hover {
    transform: translateY(-2px);
    background: rgba(168, 85, 247, 0.15);
    box-shadow: 0 12px 30px rgba(139, 99, 255, 0.4);
}

/*Inputs*/
input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid rgba(168, 85, 247, 0.35);
    background: rgba(255, 255, 255, 0.04);
    color: white;
    outline: none;
    font-size: 14px;
    transition: border 0.25s, box-shadow 0.25s;
    text-align: left;
    margin-bottom: 0;
}

input:focus{
    border-color: #a855f7;
    box-shadow: 0 0 0 1px rgba(168, 85, 247, 0.3);
}

input::placeholder {
    color: #c6c6c6;
}

/*Options*/
.options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 6px;
    margin-bottom: 22px;
    font-size: 13px;
}

.rememberMe {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rememberMe label {
    line-height: 1;
    margin: 0;
    font-size: 13px;
    cursor: pointer;
}

.rememberMe input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: #a855f7;
    cursor: pointer;
    margin: 0;
    vertical-align: middle;
}

.forgot {
    color: #a855f7;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
}

.forgot:hover {
    text-decoration: underline;
}

/*Login Button*/
.login-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    background: linear-gradient(135deg, #8b63ff, #a855f7);
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    box-shadow: 0 12px 30px rgba(139, 99, 255, 0.45);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(139, 99, 255, 0.6);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: none;
}

.login-btn.loading .btn-text {
    display: none;
}

.login-btn.loading .btn-text {
    display: inline-block;
}


/*Register*/
.register {
    margin-top: 20px;
}

.register a {
    color: #a47bff
}

h1 {
    font-size: 36px;
    margin-bottom: 6px;
    font-weight: 700;
}

.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.particle {
    position: absolute;
    width: 6px;
    height: 8px;
    background: rgba(168, 85, 247, 0.35);
    border-radius: 50%;
    filter: blur(1px);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        transform: translateY(0) translateX(0);
        opacity: 0.2;
    }
    50% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-120vh) translateX(30px);
        opacity: 0;
    }
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0;
}

.password-wrapper input {
    margin-bottom: 0;
    padding-right: 48px;
}

.toggle-password {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.75);
}

.toggle-password:hover {
    color: #a855f7;
    text-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}

.error {
    border-color: #ff4d6d !important;
    box-shadow: 0 0 0 1px rgba(255, 77, 109, 0.4);
}

.error-text {
    color: #ff4d6d;
    font-size: 12px;
    line-height: 1.3;
}

.error-container {
    min-height: 14px;
    margin-top: 4px;
}

.field {
    margin-bottom: 16px;
}

.field.password-field {
    margin-bottom: 6px;
}

.password-field .error-container {
    margin-bottom: 6px;
}

/* TABLET AND MOBILE RESPONSIVE */

@media (max-width: 1024px) {
    body {
        justify-content: center;
        padding: 2rem;
    }
}

@media (max-width: 768px) {
    body {
        justify-content: center;
        padding: 1rem;
    }

    .login-container {
        width: 100%;
        max-width: 420px;
        padding: 32px 24px;
    }

    h1 {
        font-size: 28px;
    }

    .google-btn,
    .login-btn {
        padding: 14px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 28px 20px;
        border-radius: 22px;
    }

    h1 {
        font-size: 24px;
    }

    .subtitle {
        font-size: 13px;
    }
}

/* Hide browser default password reveal icon */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-clear-button,
input[type="password"]::-webkit-inner-spin-button {
    display: none !important;
}
